package com.ulook.lookplanet.ui.home.login;

import androidx.annotation.Nullable;

import com.ulook.lookplanet.data.model.TUser;

import java.io.Serializable;

/**
 * Authentication result : success (user details) or error message.
 */
class LoginResult implements Serializable {
    @Nullable
    private TUser success = null;
    @Nullable
    private String error = null;

    LoginResult(@Nullable String error) {
        this.error = error;
    }

    LoginResult(@Nullable TUser success) {
        this.success = success;
    }

    @Nullable
    TUser getSuccess() {
        return success;
    }

    @Nullable
    String getError() {
        return error;
    }
}